#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    u_node_editor_subs = new node_editor_subs;
    //u_node_editor_subs->show();
    editor = new QFrameEditorSimple;
    editor->addWidget(u_node_editor_subs,"obj1");
    editor->show();
    //优化界面
    editor->setWindowTitle("SimpleNode");
    editor->setWindowIcon(QIcon(":/icons/icon_user/simple_node.png"));

    // --------------------------------------------
    // 驱动对应的逻辑
    connect(editor , &QFrameEditorSimple::dir_open_trig, u_node_editor_subs, &node_editor_subs::load ); //转发信号到嵌入的模块
    connect(editor , &QFrameEditorSimple::dir_save_trig, u_node_editor_subs, &node_editor_subs::save ); //转发信号到嵌入的模块


}

MainWindow::~MainWindow()
{
    delete ui;
}

